<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>我的资质</title>
    <link type="text/css" rel="stylesheet" href="css/index.css"/>
    <script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
    <link type="text/css" rel="stylesheet" href="css/bootstrap.min.css"/>
<!--    <script type="text/javascript" src="js/vue.min.js"></script>-->
    <script type="text/javascript" src="js/vue.js"></script>
    <script src="js/dataFiling.js"></script>
</head>
<body>
<div id="header"></div>

<div id="jkrxxrz"></div>

<div id="app" class="container" style="width: 60%">
    <label id="message"></label>
    <form id="updateForm" class="form-horizontal" role="form" enctype="multipart/form-data">
        <!-- <input type="hidden" name="userId" th:value="${session.loginUser.userId}"></input> -->
        <div class="form-group" style="text-align: center;">
            <label>身份证正面</label><br/><br/>
            <label for="idfv">
                <img v-if="dataFiling.idfv == '' || dataFiling.idfv == null" src="images/add.jpg" width="120px" height="76px"/>
                <img v-else :src="dataFiling.idfv" width="120px" height="76px"/><br/>
                上传图片
            </label>
            <input type="file" id="idfv" name="file" onclick="uploadPreview(this)" style="position:absolute;clip:rect(0 0 0 0);"/>
        </div>

        <div class="form-group" style="text-align: center;">
            <label>身份证反面</label><br/><br/>
            <label for="idrv">
                <img v-if="dataFiling.idrv == ''|| dataFiling.idrv == null" src="images/add.jpg" width="120px" height="76px"/>
                <img v-else :src="dataFiling.idrv" width="120px" height="76px"/><br/>
                上传图片
            </label>
            <input type="file" id="idrv" name="file" onclick="uploadPreview(this)" style="position:absolute;clip:rect(0 0 0 0);"/>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">工作单位</label>
            <div class="col-sm-10">
                <input class="form-control" type="text" name="workUnit" :value="dataFiling.workUnit"/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">所在地</label>
            <div class="col-sm-3">
                <select class="form-control" id="province" name="province" onchange="getCityByProId(this.value)"></select>
                <!--<select class="form-control" id="province" name="province" @change="getCityByProId(provinceId)" v-model="provinceId">
                    <option v-for="province in provinces" :key="province.proId" :value="province.proId" :selected="province.proId == dataFiling.province">{{province.proName}}</option>
                </select>-->
                <!--<select v-else class="form-control" name="province" @change="getCityByProId(provinceId)" v-model="provinceId">
                    <option v-for="province in provinces" :key="province.proId" :value="province.proId">{{province.proName}}</option>
                </select>-->
            </div>
            <div class="col-sm-3">
                <select class="form-control" id="city" name="city" onchange="getDistrictByCityId(this.value)"></select>
                <!--<select v-if="provinceId == dataFiling.province" class="form-control" id="city" name="city" @change="getDistrictByCityId(cityId)" v-model="cityId">
                    <option v-for="city in cities" :key="city.cityId" :value="city.cityId" :selected="city.cityId == dataFiling.city">{{city.cityName}}</option>
                </select>
                <select v-else class="form-control" name="city" @change="getDistrictByCityId(cityId)" v-model="cityId">
                    <option v-for="(city, index) in cities" :key="city.cityId" :value="city.cityId" :selected="">{{city.cityName}}</option>
                </select>-->
            </div>
            <div class="col-sm-3">
                <select class="form-control" id="district" name="district"></select>
                <!--<select class="form-control" id="district" name="district">
                    <option v-for="district in districts" :key="district.disId" :value="district.disId" :selected="district.disId == dataFiling.district">{{district.disName}}</option>
                </select>-->
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">详细地址</label>
            <div class="col-sm-10">
                <input class="form-control" type="text" name="address" :value="dataFiling.address"/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">单位电话</label>
            <div class="col-sm-10">
                <input class="form-control" type="text" name="tel" :value="dataFiling.tel"/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">月收入</label>
            <div class="col-sm-10">
                <input class="form-control" type="text" name="monthlyIncome" :value="dataFiling.monthlyIncome"/>
            </div>
        </div>

        <div class="form-group" style="text-align: center;">
            <label>房产证</label><br/><br/>
            <label for="propertyOwnership">
                <img v-if="dataFiling.propertyOwnership == '' || dataFiling.propertyOwnership == null" src="images/add.jpg" width="120px" height="76px"/>
                <img v-else :src="dataFiling.propertyOwnership" width="120px" height="76px"/><br/>
                上传图片
            </label>
            <input type="file" id="propertyOwnership" name="file" onclick="uploadPreview(this)" style="position:absolute;clip:rect(0 0 0 0);"/>
        </div>

        <div class="form-group" style="text-align: center;">
            <label>机动车行驶证</label><br/><br/>
            <label for="vehicleLicense">
                <img v-if="dataFiling.vehicleLicense == '' || dataFiling.vehicleLicense == null" src="images/add.jpg" width="120px" height="76px"/>
                <img v-else :src="dataFiling.vehicleLicense" width="120px" height="76px"/><br/>
                上传图片
            </label>
            <input type="file" id="vehicleLicense" name="file" onclick="uploadPreview(this)" style="position:absolute;clip:rect(0 0 0 0);"/>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">学历</label>
            <div class="col-sm-10">
                <select class="form-control" id="education" name="education">
                    <option v-for="education in educations" :key="education.educationId" :value="education.educationId" :selected="education.educationId == dataFiling.education">{{education.educationName}}</option>
                </select>
            </div>
        </div>

        <div class="form-group" style="text-align: center;">
            <label>银行流水</label><br/><br/>
            <label for="bankStatement">
                <img v-if="dataFiling.bankStatement == '' || dataFiling.bankStatement == null" src="images/add.jpg" width="120px" height="76px"/>
                <img v-else :src="dataFiling.bankStatement" width="120px" height="76px"/><br/>
                上传图片
            </label>
            <input type="file" id="bankStatement" name="file" onclick="uploadPreview(this)" style="position:absolute;clip:rect(0 0 0 0);"/>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">担保公司</label>
            <div class="col-sm-10">
                <input class="form-control" type="text" name="guarantorCompany" :value="dataFiling.guarantorCompany"/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">担保人</label>
            <div class="col-sm-10">
                <input class="form-control" type="text" name="guarantor" :value="dataFiling.guarantor"/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">贷款用途</label>
            <div class="col-sm-10">
                <input class="form-control" type="text" name="loanPurpose" :value="dataFiling.loanPurpose"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-5 col-sm-2" style="text-align: center;">
                <button onclick="updateDataFiling()" type="button" class="btn btn-default">提交</button>
            </div>
        </div>
    </form>
</div>

<div style="margin-top: 30px"></div>

<div id="footer"></div>
</body>
</html>